

const debounce = (function() {
	let timer = null
	return (fun, delay = 1000) => {
		timer && clearTimeout(timer)
		timer = setTimeout(() => {
			clearTimeout(timer)
			fun()
		}, delay)
	}
}())
// const setSess={...JSON.parse(uni.getStorage('examStorage'))}
const functions = {
	debounce,
	// setSess
}

export default (Vue) => {
	Object.keys(functions).map(funName => {
		Vue.prototype[funName] = functions[funName]
	})
}
